package minjre;

import minjre.binparse.BinParse;
import minjre.libparse.LibParse;

import java.io.File;
import java.util.Scanner;

/**
 * @description:
 * @author: 陈瑞东
 * @create: 2021-05-28 13:29
 */
public class Start {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入pid:");
        String pid = scanner.nextLine();
        System.out.println("指定JRE的bin目录（建议复制一份）：");
        String binSrc = scanner.nextLine();
        System.out.println("请输入输出目录：");
        String outPath = scanner.nextLine();
        System.out.println("请输入要运行的jar包的路径：");
        String jarPath = scanner.nextLine();

        // bin文件提取
        BinParse binParse = new BinParse(outPath);
        File file = new File(binSrc);
        binParse.runParse(pid.trim(), file);

        // lib文件提取
        LibParse libParse = new LibParse(outPath);
        libParse.runParse(jarPath,binSrc + "/java.exe");
    }


}
